import Vue from 'vue'
import Router from 'vue-router'
import layout from '@/view/layout'
import index from '@/view/index'
import mysend from '@/view/mysend'
import person from '@/view/person'
import order from '@/view/order'
import submitOrder from '@/view/submitOrder'
import setAddress from '@/view/setAddress'
import selectUser from '@/view/selectUser'
import mySendDetail from '@/view/mySendDetail'
import mySendOrderDetail from '@/view/mySendOrderDetail'
import setHeader from '@/view/setHeader'
import setName from '@/view/setName'
import attention from '@/view/attention'
import setPhone from '@/view/setPhone'
import myCode from '@/view/myCode'
import showOrder from '@/view/showOrder'
import Bluetooth from '@/view/Bluetooth'
import orderInfo from '@/view/orderInfo'
import setOptions from '@/view/setOptions'
import setPassworld from '@/view/setPassworld'
import setAutograph from '@/view/setAutograph'
import renew from '@/view/renew'
import login from '@/view/login'
import register from "@/view/register";
import history from '@/view/historyList'
import pay from '@/view/pay'
import auth from '@/view/auth'
import wpass from '@/view/wpass'
import xiyi from '@/view/xiyi'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'layout',
      component: layout,
      redirect:'/index',
      children:[
        {
          path: '/index',
          name: 'index',
          component: index,
        },
        {
          path: '/mysend',
          name: 'mysend',
          component: mysend,
        },
        {
          path: '/person',
          name: 'person',
          component: person,
        },
      ]
    },
    {
      path:'/order',
      name:'order',
      component:order
    },
    {
      path:'/xiyi',
      name:'xiyi',
      component:xiyi
    },
    {
      path:'/auth',
      name:'auth',
      component:auth
    },
    {
      path:'/wpass',
      name:'wpass',
      component:wpass
    },
    {
      path:'/showOrder',
      name:'showOrder',
      component:showOrder
    },
    {
      path:'/renew',
      name:'renew',
      component:renew
    },
    {
      path:'/setAutograph',
      name:'setAutograph',
      component:setAutograph
    },
    {
      path:'/Bluetooth',
      name:'Bluetooth',
      component:Bluetooth
    },
    {
      path:'/orderInfo',
      name:'orderInfo',
      component:orderInfo
    },
    {
      path:'/setOptions',
      name:'setOptions',
      component:setOptions
    },
    {
      path:'/setPassworld',
      name:'setPassworld',
      component:setPassworld
    },
    // 。。。。
    {
      path:'/submitOrder',
      name:'submitOrder',
      component:submitOrder
    },
    {
      path:'/setAddress',
      name:'setAddress',
      component:setAddress
    },
    {
      path:"/selectUser",
      name:"selectUser",
      component:selectUser
    },
    {
      path:"/mySendDetail",
      name:"mySendDetail",
      component:mySendDetail
    },
    {
      path:'/mySendOrderDetail',
      name:'mySendOrderDetail',
      component:mySendOrderDetail
    },
    {
      path:'/setHeader',
      name:'setHeader',
      component:setHeader
    },
    {
      path:'/setName',
      name:'setName',
      component:setName
    },
    {
      path:'/attention',
      name:'attention',
      component:attention
    },
    {
      path:'/setPhone',
      name:'setPhone',
      component:setPhone
    },
    {
      path:'/myCode',
      name:'myCode',
      component:myCode
    },
    {
      path:'/login',
      name:'login',
      component:login
    },
    {
      path:'/register',
      name:'register',
      component:register
    },
    {
      path:'/history',
      name:'history',
      component:history
    },
    {
      path:"/pay",
      name:"pay",
      component:pay
    }
  ]
})
